#!/bin/bash

MAP="chasmofchaos1"

if [ -n "$1" ]
then
  MAP=$1
fi

cd $MAP

rm -rf maps
rm -v Temp???.dxt1
mkdir -v maps
wine ../mapcwin-0.2/mapc.exe $MAP.map
cp -v $MAP.sm* maps
7z a $MAP.sd7 maps
cp -v $MAP.sd7 ~/.spring/maps

cd ..

